package com.jshop.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author jon
 * @date 2019/8/13 20:50
 */
@Configuration
@EnableTransactionManagement

public class MyBatisConfig {
//    /**
//     * 数据权限插件
//     *
//     * @return DataInterceptor
//     */
//    @Bean
//    public DataInterceptor dataScopeInterceptor() {
//        return new DataInterceptor();
//    }
    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }

}
